package vn.fithou.hou_elearning.activity;

import vn.fithou.hou_elearning.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class WelcomeActivity extends Activity implements OnClickListener {
	
	public Button btnCalendar = null;
	public Button btnReport = null;
	public Button btnUserInfor = null;
	public Button btnLogin = null;
	public Button btnRegister = null;
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.welcome_layout);
        
        btnCalendar = (Button)findViewById(R.id.btn_calendar);
        btnReport = (Button)findViewById(R.id.btn_report);
        btnUserInfor = (Button)findViewById(R.id.btn_userinfor);
        btnLogin = (Button)findViewById(R.id.btn_login);
        btnRegister = (Button)findViewById(R.id.btn_register);
        
        btnCalendar.setOnClickListener(this);
        btnReport.setOnClickListener(this);
        btnUserInfor.setOnClickListener(this);
        btnLogin.setOnClickListener(this);
        btnRegister.setOnClickListener(this);
    }
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
	        case R.id.btn_calendar:
	        	Intent inCalendar = new Intent(this, CalendarActivity.class);
	        	this.startActivity(inCalendar);
	        	break;
	        case R.id.btn_report:
	        	Intent inReport = new Intent(this, ReportActivity.class);
	        	this.startActivity(inReport);
	        	break;
	        case R.id.btn_userinfor:
	        	Intent inUserInfor = new Intent(this, UserInforActivity.class);
	        	this.startActivity(inUserInfor);
	        	break;
	        case R.id.btn_login:
	        	Intent inLogin = new Intent(this, LoginActivity.class);
	        	this.startActivity(inLogin);
	        	break;
	        case R.id.btn_register:
	        	Intent inRegister = new Intent(this, RegisterActivity.class);
	        	this.startActivity(inRegister);
	        	break;
		}
	}
}